Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I accidentally closed #1552 with a force push, so...
Summary
Add benchmarks for uniform distribution / single-sample variates for
Simd
types:u8x8, u8x16, u8x32, u8x64, i16x8, i16x16, i16x32
.Also, change the name of the non-SIMD benchmarks to "x1" e.g.
sample_i16x1/SmallRng/distr
.Motivation
This is a pre-requisite for any type of SIMD optimisation.
Details
Sample output (5800X):
Further motivation
In particular, I wanted to know whether the
target_feature
optimisations insrc/distr/utils.rs
are useful. Not using the sse2 and avx2 features on my CPU (which doesn't support AVX512) I get very similar results implying they may not be useful:I was planning to then test whether or not run-time detection of CPU features was viable, but with the above results it may not even be worth asking.